<template>
  <div class="options">
    <div class="top">
      <van-icon @click="$router.back()" name="arrow-left" />
      <p>设置</p>
    </div>
    <div class="she" @click="$router.push('/setPassword')">设置密码</div>
    <div class="btn" @click="loginOut">
        <button>退出登录</button>
    </div>
  </div>
</template>
<script>
import {useRouter} from 'vue-router'
export default {
    setup(props) {
        let {push}= useRouter()
        const loginOut=()=>{
            push('/login')
            localStorage.removeItem('msmktoken')
        }
        return{loginOut}
    }
}
</script>
<style lang="scss" scoped>
.top {
  display: flex;
  padding: 20px 10px;
  align-items: center;
  font-size: 26px;
  border-bottom: 1px solid #ccc;
  p {
    width: 90%;
    text-align: center;
  }
}
.she{
    padding: 20px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}
.btn{
    padding: 20px;
    button{
        width: 100%;
        outline: none;
        height: 80px;
        border: none;
        background: #fd6614;
        color: #fff;
        border-radius: 40px;
    }
}
</style>